<link href="../core/resource/css/pc.css?v=20190513" rel="stylesheet">
<style type="text/css">
.container-index {
    max-width: 1210px;
    margin: 0 auto;
    padding: 0!important;
}
.register-container{
	width:100%;
	height: 100%;
	position: absolute;
}
</style>
<div ng-if="pagedata.op=='get'" class="register-container container" style="min-height:100%;background:url('../core/resource/images/bg-login.png') no-repeat #18bc9c ;">
    <div class="container-index">
        <div class="register" style="margin:180px auto">
			<div class="r" style="width:100%" ng-if="pagedata.wxauth!=1">
					<a class="wxlogincode" href="javascript:;" ng-click="pagedata.wechat_login();">
						<img src="../core/resource/images/wxlogincode.png" border="0">
					</a>
					<div class="wxlogintitle">
							<img src="../core/resource/images/diy/icon/wechat.png" ></span>
							<span>微信安全注册</span>
					</div>
			</div>
			<div class="r" style="width:100%" ng-if="pagedata.wxauth==1">
					<a class="wxlogincode" href="javascript:;" ng-click="pagedata.wxauth=0">
						<img src="../core/resource/images/userlogincode.png" border="0">
					</a>
					<div class="wxlogintitle">
							<span>账号密码注册</span>
					</div>
			</div>
			<div class="forminfo" ng-if="pagedata.wxauth!=1">
            <form action="" method="post" role="form" id="form1">
				<div class="form-group fui-tab" ng-if="pagedata.item.show_type" style="margin-bottom:22px">
					<a ng-class="{'disabled':pagedata.item.login_type!=0,'active':pagedata.item.login_type==0}" ng-click="pagedata.item.login_type=0">账号注册</a>
					<a ng-class="{'disabled':pagedata.item.login_type!=1,'active':pagedata.item.login_type==1}" ng-click="pagedata.item.login_type=1">手机注册</a>
				</div>
				<div class="form-group fui-tab" ng-if="!pagedata.item.show_type" style="margin-bottom:22px">
					<a class="active" ng-click="pagedata.item.login_type=1">账号注册</a>
					<a class="disabled"></a>
				</div>
				<div ng-if="pagedata.item.login_type!=1">
					<div class="form-group">
						<div class="log-form-item">
							<input type="text" ng-model="pagedata.item.username" placeholder="输入您的账号" class="form-control log-input">
							<i class="icon icon-wo1"></i>
						</div>
					</div>
					<div class="form-group">
						<div class="log-form-item">
							<input type="password" ng-model="pagedata.item.password" placeholder="输入您的密码" class="form-control log-input">
							<i class="icon icon-mima"></i>
						</div>	
					</div>
					<div class="form-group">
						<div class="log-form-item">
							<input type="password" ng-model="pagedata.item.password1" placeholder="请再次输入密码" class="form-control log-input">
							<i class="icon icon-mima"></i>
						</div>	
					</div>
				</div>
				<div class="form-group" ng-if="pagedata.item.login_type==1">
						<div class="log-form-item">
							<input type="text" ng-model="pagedata.item.mobile" placeholder="输入您的手机号" class="form-control log-input">
							<i class="icon icon-shumashouji"></i>
						</div>
				</div>
				<div class="form-group input-group" ng-show="pagedata.verify_code">
						<div class="input-group-addon"><i class="fa fa-info"></i></div>
						<input ng-model="pagedata.item.code" class="form-control" style="width:110px;" placeholder="请输入验证码">
						<a href="javascript:;" id="code" ng-click="code_image('imgverify')" style="text-decoration: none"><img id="imgverify" src="../core/resource/images/no_imgcode.png" style="height:44px;" title="点击图片更换验证码"/></a>
				</div>
				<div class="form-group input-group" ng-show="pagedata.item.login_type==1">
							<div class="input-group-addon"><i class="fa fa-info"></i></div>
							<input ng-model="pagedata.item.smscode" class="form-control" style="width:110px;" placeholder="请输入验证码">
							<a class="btn btn-default btn-default-o btn-sm" href="javascript:;" id="smscode" ng-click="pagedata.send_smscode(pagedata.item.mobile,pagedata.item.code)" style="text-decoration: none;margin:2px 10px;padding:10px 12px">发送验证码</a>
				</div>
				<div class="fui-cell-group">
						<div class="fui-cell small ">
							<div class="fui-cell-info">
								<label class="checkbox-inline">
									<input type="checkbox" value="1" ng-model="pagedata.item.check" class="fui-checkbox-primary" style="height:18px" id="agree" ng-checked="pagedata.item.check==1"/> 我已经阅读并了解了<a id="btn-apply" ng-click="pagedata.show_xieyi=true;" style="color:#337ab7;">【{{pagedata.setmobile.xieyi_title || '客户注册协议'}}】</a>。
								</label>
							</div>
						</div>
				</div>
				<div class="form-group" ng-init="code_image('imgverify')">
					<div id="submit" style="text-align:center;" ng-click="post(pagedata.item,'register');" class="login-btn">注册账号</div>
					<!--<div ng-if="pagedata.wechat_scan_login" style="text-align:center;" ng-click="pagedata.wechat_login()" class="login-btn">微信一键登录</div>-->
				</div>
				<div class="form-group other-login-line">
					<div class="other-login-line"><div class="label"> 使用第三方账号注册 </div><div class="line"></div></div>
					<div class="other-login clearfix">
						<div ng-show="pagedata.qq_login" class="login-btn" ng-click="post({},'qq_login')"><i class="fa fa-qq"></i></div>
						<div ng-show="pagedata.wechat_login && pagedata.wxauth!=1" class="login-btn wechat" ng-click="pagedata.wechat_login();"><i class="fa fa-wechat"></i></div>
					</div>
					<div class="login-footer">已经注册了？<a class="action" href="javascript:;" ng-click="access_json('core/member.login/')">去登录</a></div>
				</div>
            </form>
			</div>
			<div class="forminfo" ng-if="pagedata.wxauth==1">
				<div class="form-group log-qrcode-cont" style="margin-top:50px">
					<div class="wap-qrcode-image" id="login_ewm" style="width:160px;margin:0 auto">
					</div>
					<div class="text"><i class="icon icon-saoyisao1"></i> 打开微信，扫一扫登录</div>
				</div>
				<div class="form-group other-login-line">
					<div class="other-login-line"><div class="label"> 使用第三方账号登录 </div><div class="line"></div></div>
					<div class="other-login clearfix">
						<div ng-show="pagedata.qq_login" class="login-btn" ng-click="post({},'qq_login')"><i class="fa fa-qq"></i></div>
						<div ng-show="pagedata.wechat_login && pagedata.wxauth!=1" class="login-btn wechat" ng-click="post({},'wechat_login')"><i class="fa fa-wechat"></i></div>
					</div>
					<!--<div class="login-footer">还没有全网账号？<a class="action" href="javascript:;" ng-click="access_json('core/user.register/')">去注册</a></div>-->
				</div>
			</div>
        </div>
    </div>
</div>
<div ng-include="sys_html('common/_xieyi',true)"></div>
<script>
scope.pagedata.item.needcheck=1;
scope.pagedata.item.login_type=1
scope.pagedata.send_smscode=function(mobile,code){
	if(!mobile){
		alert('请先填写手机号！');
		return false;
	}
	if(scope.pagedata.verify_code && !code){
		alert('请先填写下面的图片验证码！');
		return false;
	}
	if(scope.pagedata.sending){
		return false;
	}
	scope.tool.mobile_code(mobile,'smscode');
}
scope.pagedata.foget=function(){
	scope.message('忘记密码请联系系统管理员');
}
</script>
<script>
scope.pagedata.wechat_login=function(){
	var url=scope.tool.custom_url('core/member.login/wxauth_check/session_id='+scope.pagedata.session_id,true);
	scope.tool.qr(url,'login_ewm');
	scope.pagedata.wxauth=1;
	scope.tool.wechat_login(function(res){
		if(res.to_uid==scope.pagedata.session_id && res.message && res.message.openid){
			scope.pagedata.item.openid=res.message.openid;
			scope.post(scope.pagedata.item,'core/member.login/wechat_login/');
		}
	});
}
</script>
